from django.db import models

from apps.food.models import Foods


class SlideShow(models.Model):
    """首页轮播图"""
    food_img = models.ForeignKey(Foods, on_delete=models.PROTECT, verbose_name='从属类别')

    create_time = models.DateTimeField(auto_now_add=True, verbose_name="创建时间")
    update_time = models.DateTimeField(auto_now=True, verbose_name="更新时间")
    is_show = models.BooleanField(default=False, verbose_name='是否展示')

    class Meta:
        db_table = 'cp_slideshow'
        verbose_name = '首页轮播图'
        verbose_name_plural = verbose_name

